/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.pe.siass.utils;

import java.awt.Color;
import org.jfree.chart.ChartFactory;
import org.jfree.chart.JFreeChart;
import org.jfree.chart.plot.CategoryPlot;
import org.jfree.chart.plot.PlotOrientation;
import org.jfree.data.category.CategoryDataset;

/**
 *
 * @author Hrengifo
 */
public class UGraficos {

    public JFreeChart generaGraficoBarras( String strTitulo, String strLeyendaX, String strLeyendaY,
                                            CategoryDataset dataset, boolean bLegents, boolean bBoolTips,
                                            boolean bUrls, Color cBackground, Color cGridLinePaint,
                                            float fTranspparencia) {

        JFreeChart jfreechart = ChartFactory.createBarChart3D(
                strTitulo,
                strLeyendaX,
                strLeyendaY,
                dataset,
                PlotOrientation.VERTICAL,
                bLegents,
                bBoolTips,
                bUrls);

        CategoryPlot plot = jfreechart.getCategoryPlot();
        plot.setBackgroundPaint(cBackground);
        plot.setRangeGridlinePaint(cGridLinePaint);
	plot.setForegroundAlpha(fTranspparencia); // transpariencia

        return jfreechart;
    }

}
